<!doctype html>
<html class="no-js fixed-layout">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>首页</title>
  <meta name="description" content="index">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="/static/assets/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="/static/assets/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="/static/assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="/static/assets/css/admin.css">
  <style type="text/css">
    .input_width{
      width: 90%;
    }
    .span_x{
      color: red;
    }
    .div_text{
      width: 20%;
      padding-right: 1.5rem;
      float: left;
      position: relative;
    }
  </style>
</head>
<body >



  <div class="admin-content">
    <div class="admin-content-body" style="background-color: #EBEBEB;">

      <div class="am-g" style="width: 50%;min-width: 1000px;padding-bottom: 70px;">


 
        <div class="am-u-sm-12 am-u-md-12 " style="background-color: #FFFFFF;margin: 1px auto;padding: 20px;">
          <!--中间侧块 注意下面是form表-->
          
          <div class="am-form-group" style="width: 20%;float: left;font-size: 20px;padding-top: 20px;">
            <label ><strong>路线信息</strong></label>
          </div>
          <div class="am-form-group" style="width: 80%;float: right;font-size: 1.37rem;">

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">所属路线：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='line_id' name='line_id' class="input_width" onchange="line_id_change()">
                  {% for i in line %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">所属路段：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='section_id_0' name='section_id_0' class="input_width" style="display: none;" >
                  {% for i in section %}
                  <option value={{ i.id }} name=line_id_{{ i.lineId }} >{{ i.name }}</option>
                  {% endfor %}
                </select>

                <select  id='section_id' name='section_id' class="input_width" >
                  {% for i in section %}

                  <option name=line_id_{{ i.lineId }} value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">路线等级：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <select  id='param_line_level' name='param_line_level' class="input_width" >
                  {% for i in lineLevel %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
            </div>

          </div>

        </div>
        <div class="am-u-sm-12 am-u-md-12 " style="background-color: #FFFFFF;margin: 1px auto;padding: 20px;">
          <!--中间侧块 注意下面是form表-->
          
          <div class="am-form-group" style="width: 20%;float: left;font-size: 20px;padding-top: 20px;">
            <label ><strong>基本信息</strong></label>
          </div>
          <div class="am-form-group" style="width: 80%;float: right;font-size: 1.37rem;">

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right"><span class="span_x">*</span>桥梁名称：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width" id="bridge_name"  maxlength="100">
              </div>
              <div class="div_text am-text-right"><span class="span_x">*</span>桥梁编号：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width" id="bridge_code"  maxlength="100">     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">类别：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='bridgecategory' name='bridgecategory' class="input_width" >
                  {% for i in bridgecategory %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">桥位桩号：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="pile_no"  maxlength="100">     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">功能类型：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_func_type' name='param_func_type' class="input_width" >
                  {% for i in funcType %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">下穿道名：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="under_cross_road"  maxlength="100">     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">下穿道桩号：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="under_cross_road_no" maxlength="100">
              </div>
              <div class="div_text am-text-right">设计载荷：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_design_load' name='param_design_load' class="input_width" >
                  {% for i in designLoad %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>   
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">通行载重(t)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="run_load" maxlength="100">
              </div>
              <div class="div_text am-text-right">桥梁纵坡(%)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="bridge_longitudinal_slope" maxlength="100">     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥梁横坡(%)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="bridge_cross_slope" maxlength="100">     
              </div>

              <div class="div_text am-text-right">桥长(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="length" maxlength="100">
              </div>
              
            </div>
            
            <div class="am-g am-margin-top am-form-group">
            <div class="div_text am-text-right">桥面总宽(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="bridge_total_width" maxlength="100">     
              </div>
              <div class="div_text am-text-right">车行道宽(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="driveway_width" maxlength="100">
              </div>
              
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥面标高(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="deck_elevation" maxlength="100">     
              </div>

              <div class="div_text am-text-right">桥下净高(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="under_height" maxlength="100">     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">引道总宽(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="approach_width" maxlength="100">
              </div>

              <div class="div_text am-text-right">引道路面宽(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="approach_road_width" maxlength="100">     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">引道线形：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='approach_linear' name='approach_linear' class="input_width" >
                  {% for i in approachAlignment %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">交角(°)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="angle" maxlength="100">     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">总跨数：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="span_total" maxlength="100">
              </div>

              <div class="div_text am-text-right">中央隔离带(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="central_isolation_belt" maxlength="100">
              </div>
              <!-- <div class="div_text am-text-right">路面净宽(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="deck_width" maxlength="100">     
              </div> -->

              <!-- <div class="div_text am-text-right">跨越情况说明：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="cross_situation_explain" maxlength="100">      
              </div> -->
            </div>



            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">建设年限：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="date"  class="am-input-xl  input_width"  id="build_date">
              </div>
              <div class="div_text am-text-right">支座类型：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_support_type' name='param_support_type' class="input_width" >
                  {% for i in supportType %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥塔结构形式：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_tower_structure_form' class="input_width" >
                  {% for i in towerStructureForm %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select> 
              </div>
              <div class="div_text am-text-right">桥塔材料：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_tower_material'  class="input_width" >
                  {% for i in towerMaterial %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>     
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥上净高(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="bridge_clear_height" maxlength="100">
              </div>
              <div class="div_text am-text-right">地震动峰值加速度系数：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="earthquake_pac" maxlength="100">
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥台护坡：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="abutment_slope_protection" maxlength="100">
              </div>
              <div class="div_text am-text-right">护墩体：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="pier_body" maxlength="100">
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">调制构造物：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="modulation_structure" maxlength="100">
              </div>
              <div class="div_text am-text-right">常水位(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="water_level" maxlength="100">  
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">设计水位(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="design_water_level" maxlength="100">
              </div>
              <div class="div_text am-text-right">历史洪水位(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="historical_flood_level" maxlength="100">  
              </div>
            </div>



          </div>
          
        </div>
        <div class="am-u-sm-12 am-u-md-12 " style="background-color: #FFFFFF;margin: 1px auto;padding: 20px;">
          <!--中间侧块 注意下面是form表-->
          
          <div class="am-form-group" style="width: 20%;float: left;font-size: 20px;padding-top: 20px;">
            <label ><strong>下部结构</strong></label>
          </div>
          <div class="am-form-group" style="width: 80%;float: right;font-size: 1.37rem;">

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥墩形式：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_pier_style' name='param_pier_style'  class="input_width" >
                  {% for i in pierStyle %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">桥墩材料：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <select  id='param_pier_material' name='param_pier_material' class="input_width" >
                  {% for i in material %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥墩基础形式：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_pier_base_form' name='param_pier_base_form' class="input_width" >
                  {% for i in form %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">桥台形式：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <select  id='param_abutment_style' name='param_abutment_style' class="input_width" >
                  {% for i in abutmentStyle %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥台材料：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_abutment_material' name='param_abutment_material' class="input_width" >
                  {% for i in material %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">桥台基础形式：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <select  id='param_abutment_base_form' name='param_abutment_base_form' class="input_width" >
                  {% for i in form %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
            </div>
            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥塔基础材料：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_tower_basis_material'  class="input_width" >
                  {% for i in  towerBasisMaterial %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">桥塔基础形式：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <select  id='param_tower_base_form' class="input_width" >
                  {% for i in form %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
            </div>
            <!-- <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">项目墩号：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width"  id="under_pier_number" maxlength="100">
              </div>
              <div class="div_text am-text-right">项目台号：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <input type="text"  class="am-input-xl  input_width"  id="under_abutment_number" maxlength="100">
                      
              </div>
            </div> -->

          </div>
        </div>


        <div class="am-u-sm-12 am-u-md-12 " style="background-color: #FFFFFF;margin: 1px auto;padding: 20px;">
          <!--中间侧块 注意下面是form表-->
          
          <div class="am-form-group" style="width: 20%;float: left;font-size: 20px;padding-top: 20px;">
            <label ><strong>桥面系</strong></label>
          </div>
          <div class="am-form-group" style="width: 80%;float: right;font-size: 1.37rem;">

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">桥面铺装：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <select  id='param_deck_pavement' name='param_deck_pavement' class="input_width" >
                  {% for i in deckPavement %}
                  <option value={{ i.id }} >{{ i.name }}</option>
                  {% endfor %}  
                </select>
              </div>
              <div class="div_text am-text-right">伸缩缝类型：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <select  id='param_expansion_type' name='param_expansion_type' class="input_width" >
                  {% for i in expJoint %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">左侧防护设施：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <select  id='param_left_facilities' name='param_left_facilities' class="input_width" >
                  {% for i in facilities %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
              <div class="div_text am-text-right">右侧防护设施：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <select  id='param_right_facilities' name='param_right_facilities' class="input_width" >
                  {% for i in facilities %}

                  <option  value={{ i.id }} >{{ i.name }}</option>

                  {% endfor %}  
                </select>
                      
              </div>
            </div>
            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">左侧防护设施宽度(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <input type="text"  class="am-input-xl  input_width"  id="left_facilities_width" maxlength="100">
                      
              </div>
              <div class="div_text am-text-right">右侧防护设施宽度(m)：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <input type="text"  class="am-input-xl  input_width"  id="right_facilities_width" maxlength="100">
                      
              </div>
            </div>
            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">伸缩缝位置：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <input type="text"  class="am-input-xl  input_width"  id="expansion_position" maxlength="100">
                      
              </div>
              
            </div>

          </div>

        </div>

        <div class="am-u-sm-12 am-u-md-12 " style="background-color: #FFFFFF;margin: 1px auto;padding: 20px;">
          <!--中间侧块 注意下面是form表-->
          
          <div class="am-form-group" style="width: 20%;float: left;font-size: 20px;padding-top: 20px;">
            <label ><strong>单位信息</strong></label>
          </div>
          <div class="am-form-group" style="width: 80%;float: right;font-size: 1.37rem;">

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">建设单位：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">
                <input type="text"  class="am-input-xl  input_width" id="construction_depart" maxlength="100">
              </div>
              <div class="div_text am-text-right">设计单位：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <input type="text"  class="am-input-xl  input_width" id="design_depart" maxlength="100" >
                      
              </div>
            </div>

            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">养护单位：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <input type="text"  class="am-input-xl  input_width" id="maintenance_depart"  maxlength="100" maxlength="100">
                      
              </div>
              <div class="div_text am-text-right">施工单位：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <input type="text"  class="am-input-xl  input_width"  id="build_depart" maxlength="100">
                      
              </div>
            </div>
            <div class="am-g am-margin-top am-form-group">
              <div class="div_text am-text-right">备注：</div>
              <div class="am-u-md-3 am-u-end" style="padding-left: 0px;">

                <input type="text"  class="am-input-xl  input_width" id="remark" maxlength="100">
                      
              </div>
              
            </div>

          </div>

        </div>

      </div>
       
      <div class="am-g" style="bottom: 0px;position: fixed;">
        <div class="am-u-sm-12 am-u-md-12 " style="background-color: #F8F8FF;margin: 1px auto;padding: 20px;">
          <div class="am-btn-toolbar">
            <div class="am-btn-group am-btn-group-xs" style="margin: 0 50%;">

              <button type="button" class="am-btn am-btn-primary am-btn-xs" onclick="add_submit()">保存</button>


            </div>
          </div>

          
          

        </div>

      </div>
    </div>
    
  </div>



<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="/static/assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="/static/assets/js/amazeui.min.js"></script>
<script src="/static/assets/js/amazeui.tree.js"></script>
<script src="/static/assets/datatables/amazeui.datatables.min.js"></script>
<script src="/static/assets/dialog/amazeui.dialog.min.js"></script>
<link rel="stylesheet" type="text/css" href="/static/assets/css/amazeui.tree.css" />
<script type="text/javascript" src="/static/assets/js/layer.js"></script>
<script src="/static/assets/js/app.js"></script>
<script type="text/javascript">
$.ajaxSetup({
  data: {csrfmiddlewaretoken: '{{ csrf_token }}' },
});

  function line_id_change(){
    var line_id = $('#line_id option:selected').val();
    $('#section_id').empty();
    $('#section_id').append($('#section_id_0 option[name^=line_id_'+line_id+']').clone());
  }

  line_id_change()


  function user_back(){
    window.history.back(-1);
  }

function add_submit(){
 
  var line_id = $('#line_id option:selected').val();var line_name = $('#line_id option:selected').text()

  var section_id = $('#section_id option:selected').val();var section_name = $('#section_id option:selected').text()
  var param_line_level = $('#param_line_level option:selected').val();

  var bridge_name = document.getElementById("bridge_name").value;
  var bridge_code = document.getElementById("bridge_code").value;
  var bridgecategory = $('#bridgecategory option:selected').val();
  var pile_no = document.getElementById("pile_no").value;
  var param_func_type = $('#param_func_type option:selected').val();
  var under_cross_road = document.getElementById("under_cross_road").value;
  var under_cross_road_no = document.getElementById("under_cross_road_no").value;
  var param_design_load = $('#param_design_load option:selected').val();
  var run_load = document.getElementById("run_load").value;
  var bridge_longitudinal_slope = document.getElementById("bridge_longitudinal_slope").value;
  var bridge_cross_slope = document.getElementById("bridge_cross_slope").value;
  var length = document.getElementById("length").value;
  var bridge_total_width = document.getElementById("bridge_total_width").value;
  var driveway_width = document.getElementById("driveway_width").value;
  var deck_elevation = document.getElementById("deck_elevation").value;
  var under_height = document.getElementById("under_height").value;
  var approach_width = document.getElementById("approach_width").value;
  var approach_road_width = document.getElementById("approach_road_width").value;
  var approach_linear = $('#approach_linear option:selected').val();
  var angle = document.getElementById("angle").value;
  var span_total = document.getElementById("span_total").value;
  // var deck_width = document.getElementById("deck_width").value;
  var central_isolation_belt = document.getElementById("central_isolation_belt").value;
  // var cross_situation_explain = document.getElementById("cross_situation_explain").value;
  var build_date = document.getElementById("build_date").value;
  var param_support_type = $('#param_support_type option:selected').val();

  var param_tower_structure_form = $('#param_tower_structure_form option:selected').val();
  var param_tower_material = $('#param_tower_material option:selected').val();
  var bridge_clear_height = $('#bridge_clear_height').val();
  var earthquake_pac = $('#earthquake_pac').val();
  var abutment_slope_protection = $('#abutment_slope_protection').val();
  var pier_body = $('#pier_body').val();
  var modulation_structure = $('#modulation_structure').val();
  var water_level = $('#water_level').val();
  var design_water_level = $('#design_water_level').val();
  var historical_flood_level = $('#historical_flood_level').val();



  var param_pier_style = $('#param_pier_style option:selected').val();
  var param_pier_material = $('#param_pier_material option:selected').val();
  var param_pier_base_form = $('#param_pier_base_form option:selected').val();
  var param_abutment_style = $('#param_abutment_style option:selected').val();
  var param_abutment_material = $('#param_abutment_material option:selected').val();
  var param_abutment_base_form = $('#param_abutment_base_form option:selected').val();
  // var under_pier_number = document.getElementById("under_pier_number").value;
  // var under_abutment_number = document.getElementById("under_abutment_number").value;

  var param_tower_basis_material = $('#param_tower_basis_material option:selected').val();
  var param_tower_base_form = $('#param_tower_base_form option:selected').val();




  var param_deck_pavement = $('#param_deck_pavement option:selected').val();
  var param_expansion_type = $('#param_expansion_type option:selected').val();
  var param_left_facilities = $('#param_left_facilities option:selected').val();
  var param_right_facilities = $('#param_right_facilities option:selected').val();
  var left_facilities_width = document.getElementById("left_facilities_width").value;
  var right_facilities_width = document.getElementById("right_facilities_width").value;
  var expansion_position = document.getElementById("expansion_position").value;

  var construction_depart = document.getElementById("construction_depart").value;
  var design_depart = document.getElementById("design_depart").value;
  var maintenance_depart = document.getElementById("maintenance_depart").value;
  var build_depart = document.getElementById("build_depart").value;
  var remark = document.getElementById("remark").value;

  

  if(bridge_name==''){
    AlertMSG("请填写桥梁名称！")
  }else if (bridge_code==''){
    AlertMSG("请填写桥梁编号！")
  }else {
    $.ajax({
      "url":"/QLXJ_QLLB_ADDSAVE/",
      "data":{"line_id":line_id,"line_name":line_name,"section_id":section_id,"section_name":section_name,"param_line_level":param_line_level,"bridge_name":bridge_name,"bridge_code":bridge_code,"bridgecategory":bridgecategory,"pile_no":pile_no,"param_func_type":param_func_type,"under_cross_road":under_cross_road,"under_cross_road_no":under_cross_road_no,"param_design_load":param_design_load,"run_load":run_load,"bridge_longitudinal_slope":bridge_longitudinal_slope,"bridge_cross_slope":bridge_cross_slope,"length":length, "bridge_total_width":bridge_total_width,"driveway_width":driveway_width,"deck_elevation":deck_elevation, "under_height":under_height,"approach_width":approach_width, "approach_road_width":approach_road_width,"approach_linear":approach_linear, "angle":angle,"span_total":span_total, "central_isolation_belt":central_isolation_belt,"build_date":build_date,"param_support_type":param_support_type,     "param_tower_structure_form":param_tower_structure_form,"param_tower_material":param_tower_material,"bridge_clear_height":bridge_clear_height,"earthquake_pac":earthquake_pac,"abutment_slope_protection":abutment_slope_protection,"pier_body":pier_body,"modulation_structure":modulation_structure,"water_level":water_level,"design_water_level":design_water_level,"historical_flood_level":historical_flood_level,     "param_pier_style":param_pier_style, "param_pier_material":param_pier_material,"param_pier_base_form":param_pier_base_form, "param_abutment_style":param_abutment_style,"param_abutment_material":param_abutment_material,  "param_abutment_base_form":param_abutment_base_form,   "param_tower_basis_material":param_tower_basis_material,"param_tower_base_form":param_tower_base_form,   "param_deck_pavement":param_deck_pavement, "param_expansion_type":param_expansion_type,"param_left_facilities":param_left_facilities,  "param_right_facilities":param_right_facilities,"left_facilities_width":left_facilities_width,"right_facilities_width":right_facilities_width,"expansion_position":expansion_position, "construction_depart":construction_depart,"design_depart":design_depart,"maintenance_depart":maintenance_depart,"build_depart":build_depart,"remark":remark},
      "datatype":"json",
      "type":"post",
      "async":"false"
    }).success(function(data){
      if (data.status == 1) {
        message_layer(data.message)
        var index = parent.layer.getFrameIndex(window.name);
        parent.location.reload();
        parent.layer.close(index);
        // console.log(data.data)
        // AlertMSG(data.message)

      } else {
        AlertMSG(data.message)
      }
    }).error(function(data){
      AlertMSG("保存失败！")
    });
  }
}
// message_layer(data.message)
function message_layer(message){
    layer.msg(message, {
    time: 2000 //2秒关闭（如果不配置，默认是3秒）
  }); 
}

var AlertMSG=function(msg){
    AMUI.dialog.alert({ title: '错误提示', content: msg, onConfirm: function() { console.log('close'); } });
}
</script>
</body>

</html>